package com.kkb.hbase.mr.demo5GroupComparator;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 * k2 v2 k3 v3
 */
public class GroupReducer extends Reducer<OrderBean, NullWritable,OrderBean,NullWritable> {
    @Override
    protected void reduce(OrderBean key, Iterable<NullWritable> values, Context context) throws IOException, InterruptedException {
        //前面排序了，这里取第一个值就是最大的金额，key就代表每次最大的金额
        context.write(key,NullWritable.get());
    }
}
